GXGetViewPortGlobalMapping
You can use theGXGetViewPortGlobalMapping
function to examine the resultant mapping after concatenating the mapping properties of a view port object with all its parent view ports.
gxMapping *GXGetViewPortGlobalMapping(gxViewPort source, gxMapping *map);
- source
- A reference to the view port whose global mapping you wish to examine.
map
- A pointer to a mapping. On return, this parameter contains the concatenation of all the mapping properties of this view port and the view ports from which it descends.
- function result
- A pointer to a copy of the
map
parameter. (This value is the same as the value returned in themap
parameter.)DESCRIPTION
TheGXGetViewPortGlobalMapping
function returns the global mapping of the source view port in its view group. This mapping is the result of concatenating the view port's mapping with that of its parent and that of its parent's parent, and so on; the concatenation ascends the view port's branch in the hierarchy, from its position to the root view port, inclusive.This function is useful when you want to determine how a shape is mapped through the root view port into the view group; that is, what its position and dimensions are in global space.
If the source view port is the root view port of a view port hierarchy, this function gives the same results as
GXGetViewPortMapping
.ERRORS, WARNINGS, AND NOTICES
Errors invalid_viewPort_reference SEE ALSO
For an example of the use of this function, see Listing 7-11 on page 7-57.To get a view port's mapping without concatenating it with the mappings of parent view ports, use the
GXGetViewPortMapping
function, described on page 7-77.For a discussion of coordinate systems, global space, and view port hierarchies, see the section "Global Space" beginning on page 7-34.
For information about the
gxMapping
structure, see the mathematics chapter of Inside Macintosh: QuickDraw GX Environment and Utilities.